<template>
	<view>
		<view class="header">
			<view class="title">{{data.title}}</view>
		</view>
		<view class="content">
			<view class="" v-html="data.content"></view>
		</view>
	</view>
</template>

<script>
	import {articleDetailApi} from '@/api/index.js';
	export default{
		data(){
			return{
				data:{
					formula_id:''
				}
			}
		},
		async onLoad(options) {
			this.formula_id = options.formula_id || ''
			await this.getArticleDetailApi()
		},
		methods:{
			async getArticleDetailApi(){
				const res = await articleDetailApi({formula_id:this.formula_id})
				this.data = res.data
			}
		}
	}
</script>

<style lang="scss">
	.header,.content{
		padding: 15px;
		width: 100%;
		box-sizing: border-box;
	}
	.title{
		text-align: center;
	}
</style>